A lodestone, either naturally occurring or man-made, will, if given freedom of movement, always orient itself along the Earth's magnetic field lines. Magnetostriction is the principle where a material with the correct properties will physically change shape when exposed to a magnetic field. Ferrogel is a gelatinous compound with magnetostrictive properties. A piezoelectric crystal will generate a spike of electrical current when physically deformed.